Copyright: Copyright © 1996 Cezar G. Lenci
Citation: {TPageSetupDialog - Freeware}


Properties

MarginLeft	MinMarginLeft	Options

MarginTop	MinMarginTop

MarginRight	MinMarginRight

MarginBottom	MinMarginBottom


MinMarginBottom
MinMarginBottom property

Applies to

TPageSetupDialog component

Declaration

property MinMarginBottom: Integer;

Description

The MinMarginBottom property defines the minimum value of the lower margin on the page setup dialog box.


MinMarginRight
MinMarginRight property

Applies to

TPageSetupDialog component

Declaration

property MinMarginRight: Integer;

Description

The MinMarginRight property defines the minimum value of the right margin on the page setup dialog box.


MinMarginTop
MinMarginTop property

Applies to

TPageSetupDialog component

Declaration

property MinMarginTop: Integer;

Description

The MinMarginTop property defines the minimum value of the upper margin on the page setup dialog box.


MinMarginLeft
MinMarginLeft property

Applies to

TPageSetupDialog component

Declaration

property MinMarginLeft: Integer;

Description

The MinMarginLeft property defines the minimum value of the left margin on the page setup dialog box.


Options
Options property

Applies to

TPageSetupDialog component

Declaration

property Options: set of TPageOptions;

Description

These are the possible values that can be included in the Options set:

Value	Meaning

poDefaultMinMargins	If True, uses the default minimum margins

poDisableMargins	If True, disables the margins settings

poMargins	If True, uses the MarginLeft, MarginTop, MarginRight and MarginBottom properties as the initial values of the margins settings

poMinMargins	If True, uses the MinMarginLeft, MinMarginTop, MinMarginRight and MinMarginBottom properties as the minimum values of the margins settings

poDisableOrientation	If True, disables the page orientation selection

poDisablePaper	If True, disables the paper type selection

poDisablePrinter	If True, disables the printer selection

poHundredthsOfMillimeters	If True, the margins are set to hundredths of millimeters

poThousandthsOfInches	If True, the margins are set to thousandths of inches


TPageSetupFlags
TPageSetupFlags type

Unit

PageSetup

Declaration

TPageSetupFlags = (poDefaultMinMargins, poDisableMargins, poMargins, poMinMargins, poDisableOrientation, poDisablePaper, poDisablePrinter, poHundredthsOfMillimeters, poThousandthsOfInches);

TPageOptions = set of TPageSetupFlags;

Description

The TPageSetupFlags type declares the nine options enumerated in the TPageOptions type as members of a set used by the Options property of the TPageSetupDialog component.


MarginBottom
MarginBottom property

Applies to

TPageSetupDialog component

Declaration

property MarginBottom: Integer;

Description

The MarginBottom property defines the initial value of the lower margin on the page setup dialog box.


MarginRight
MarginRight property

Applies to

TPageSetupDialog component

Declaration

property MarginRight: Integer;

Description

The MarginRight property defines the initial value of the right margin on the page setup dialog box.


MarginTop
MarginTop property

Applies to

TPageSetupDialog component

Declaration

property MarginTop: Integer;

Description

The MarginTop property defines the initial value of the upper margin on the page setup dialog box.


MarginLeft
MarginLeft property

Applies to

TPageSetupDialog component

Declaration

property MarginLeft: Integer;

Description

The MarginLeft property defines the initial value of the left margin on the page setup dialog box.


Methods

Execute	GetDefaults


GetDefaults
GetDefaults method

Applies to

TPageSetupDialog component

Declaration

procedure GetDefaults;

Description

The GetDefaults sets the margins properties without showing the page setup dialog box.


Execute
Execute method

Applies to

TPageSetupDialog component

Declaration

procedure Execute;

Description

The Execute method shows the page setup dialog box.


PageSetup
PageSetup unit

The PageSetup unit contains the declarations for page setup dialog box and for the enumerated type associated with it.

When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit.

The following items are declared in the PageSetup unit:

Components

TPageSetupDialog

Types

TPageSetupFlags

TPageOptions

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


TPageSetupDialog component

Properties	Methods

Unit

PageSetup

Description

The TPageSetupDialog component displays a page setup dialog box that permits the user to select which printer to print to, the page type,the page orientation and the printing margins.

Display the page setup dialog box by calling the Execute method.

You can customize how the page setup dialog box appears and behaves using the Options property.

The margins of the page are specified with the MarginLeft, MarginTop, MarginRight and MarginBottom properties.

The minimum values of the margins are specified with the MinMarginLeft, MinMarginTop, MinMarginRight and MinMarginBottom properties.

The TPageSetupDialog component is an indirect descendent of TComponent. In addition to the following properties and methods, this component also has the properties and methods that apply to all components.